import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    buyIdList: [],
    buyDataList: [],
    // 总价
    totalMoney: 0
  },
  mutations: {
    // 结算或者购买
    settle(state, list) {
      state.buyIdList = list.idList
      state.buyDataList = list.dataList
      state.totalMoney = list.totalMoney
    }
  },
  actions: {},
  modules: {}
});
